<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>考试排名</title>
<link rel="stylesheet" href="../static/layui/css/layui.css">
</head>
<body>
	<h1>考试排名</h1><br>
	
	<!-- 按钮区 -->
	<div class="site-demo-button" id="layerDemo" style="margin-bottom: 0;">
	  <button class="layui-btn">创建考试</button>
	  <button class="layui-btn">考试管理</button>
	</div></br>
	
   <!-- 主体内容区 -->
   <hr/>
   <table class="layui-table" style="margin-left:10px">
	  <colgroup>
	    <col width="100">
	  </colgroup>
	 <thead>
	     <tr>
	        <th><input type="checkbox"/></th>
	        <th>姓名</th><th>班级</th><th>得分</th>
	     </tr>
     </thead>
     <tbody>
     <c:forEach items="${userRecordlist}" var="use">
       <tr>
       <td><input type='checkbox' name='st' /></td>
       <td>${use.user_name}</td><td><a href="grade_record.jsp?id=${use.class_id}">${use.class_name}</a></td><td>${use.user_score}</td>
       </tr>
     </c:forEach>
     </tbody>
   </table>
</body>
<script type="text/javascript" src="../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../static/layui/layui.js"></script>
<script type="text/javascript">
//按钮切换
$(function(){
    $("button:eq(0)").click(function(){
    	window.location.href='http://localhost:8080/OnlineExam1/admin/exam_record?m=addExam'
    });

    $("button:eq(1)").click(function(){
    	window.location.href='http://localhost:8080/OnlineExam1/admin/exam_record?m=page'
    }); 
});
</script>
</html>